<!DOCTYPE html>
<html lang="en">
  <head>
    <title>ImagePrefetcher Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Class/ImagePrefetcher" class="dashAnchor"></a>

    <a title="ImagePrefetcher Class Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../index.html">
          Kingfisher 5.12.0 Docs
        </a>
         (83% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/onevcat/Kingfisher">
            <img class="header-icon" src="../img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="dash-feed://http%3A%2F%2Fonevcat%2Egithub%2Eio%2FKingfisher%2Fdocsets%2FKingfisher%2Exml">
            <img class="header-icon" src="../img/dash.png"/>
            Install in Dash
          </a>
        </p>
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../index.html">Kingfisher Reference</a>
      <img class="carat" src="../img/carat.png" />
      ImagePrefetcher Class Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/AnimatedImageView.html">AnimatedImageView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/AnimatedImageView/RepeatCount.html">– RepeatCount</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ImageCache.html">ImageCache</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ImageDownloader.html">ImageDownloader</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ImagePrefetcher.html">ImagePrefetcher</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/KingfisherManager.html">KingfisherManager</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/RetrieveImageTask.html">RetrieveImageTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/SessionDataTask.html">SessionDataTask</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Global%20Variables.html">Global Variables</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Global%20Variables.html#/s:10Kingfisher0A23DiskCacheCleanedHashKeySSvp">KingfisherDiskCacheCleanedHashKey</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Global%20Variables.html#/s:10Kingfisher0A11ErrorDomainSSvp">KingfisherErrorDomain</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/CacheType.html">CacheType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/CallbackQueue.html">CallbackQueue</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ContentMode.html">ContentMode</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/DiskStorage.html">DiskStorage</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/DiskStorage/Backend.html">– Backend</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/DiskStorage/Config.html">– Config</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ExpirationExtending.html">ExpirationExtending</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageCacheResult.html">ImageCacheResult</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageFormat.html">ImageFormat</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageFormat/JPEGMarker.html">– JPEGMarker</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageProcessItem.html">ImageProcessItem</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageTransition.html">ImageTransition</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/ImageTransition.html">ImageTransition</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/IndicatorSizeStrategy.html">IndicatorSizeStrategy</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/IndicatorType.html">IndicatorType</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/KingfisherError.html">KingfisherError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/KingfisherError/RequestErrorReason.html">– RequestErrorReason</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/KingfisherError/ResponseErrorReason.html">– ResponseErrorReason</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/KingfisherError/CacheErrorReason.html">– CacheErrorReason</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/KingfisherError/ProcessorErrorReason.html">– ProcessorErrorReason</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/KingfisherError/ImageSettingErrorReason.html">– ImageSettingErrorReason</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/KingfisherOptionsInfoItem.html">KingfisherOptionsInfoItem</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/MemoryStorage.html">MemoryStorage</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/MemoryStorage/Backend.html">– Backend</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/MemoryStorage/Config.html">– Config</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/Result.html">Result</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/Source.html">Source</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/Source/Identifier.html">– Identifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Enums/StorageExpiration.html">StorageExpiration</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions.html#/c:@S@CGSize">CGSize</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions/Collection.html">Collection</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions/Data.html">Data</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions.html#/s:10Kingfisher21KFCrossPlatformButtona">KFCrossPlatformButton</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions/KFCrossPlatformImage.html">KFCrossPlatformImage</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions.html#/s:10Kingfisher24KFCrossPlatformImageViewa">KFCrossPlatformImageView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions/KingfisherWrapper.html">KingfisherWrapper</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions/Notification.html">Notification</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions/Notification/Name.html">– Name</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions.html#/s:SS">String</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions.html#/c:objc(cs)UIApplication">UIApplication</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions/URL.html">URL</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Extensions.html#/WKInterfaceImage">WKInterfaceImage</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Functions.html#/s:10Kingfisher2ggoiyAA14ImageProcessor_pAaC_p_AaC_ptF">&gt;&gt;(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Functions.html#/s:10Kingfisher2ogoiyAA14ImageProcessor_pAaC_p_AaC_ptF">|&gt;(_:_:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/AnimatedImageViewDelegate.html">AnimatedImageViewDelegate</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/AuthenticationChallengeResponsable.html">AuthenticationChallengeResponsable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/CIImageProcessor.html">CIImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/CacheCostCalculable.html">CacheCostCalculable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/CacheSerializer.html">CacheSerializer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/DataTransformable.html">DataTransformable</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ImageDataProvider.html">ImageDataProvider</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ImageDownloadRedirectHandler.html">ImageDownloadRedirectHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ImageDownloadRequestModifier.html">ImageDownloadRequestModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ImageDownloaderDelegate.html">ImageDownloaderDelegate</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ImageModifier.html">ImageModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/ImageProcessor.html">ImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/Indicator.html">Indicator</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/KingfisherCompatible.html">KingfisherCompatible</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/KingfisherCompatibleValue.html">KingfisherCompatibleValue</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/Placeholder.html">Placeholder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/Resource.html">Resource</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/AlignmentRectInsetsImageModifier.html">AlignmentRectInsetsImageModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/AnyImageModifier.html">AnyImageModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/AnyModifier.html">AnyModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/AnyRedirectHandler.html">AnyRedirectHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Base64ImageDataProvider.html">Base64ImageDataProvider</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/BlackWhiteProcessor.html">BlackWhiteProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/BlendImageProcessor.html">BlendImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/BlurImageProcessor.html">BlurImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/CacheStoreResult.html">CacheStoreResult</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ColorControlsProcessor.html">ColorControlsProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/CompositingImageProcessor.html">CompositingImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/CroppingImageProcessor.html">CroppingImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/DefaultCacheSerializer.html">DefaultCacheSerializer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/DefaultImageModifier.html">DefaultImageModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/DefaultImageProcessor.html">DefaultImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/DownloadTask.html">DownloadTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/DownsamplingImageProcessor.html">DownsamplingImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Filter.html">Filter</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/FlipsForRightToLeftLayoutDirectionImageModifier.html">FlipsForRightToLeftLayoutDirectionImageModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/FormatIndicatedCacheSerializer.html">FormatIndicatedCacheSerializer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ImageCreatingOptions.html">ImageCreatingOptions</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ImageLoadingResult.html">ImageLoadingResult</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ImageProgressive.html">ImageProgressive</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ImageResource.html">ImageResource</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/KingfisherParsedOptionsInfo.html">KingfisherParsedOptionsInfo</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/KingfisherWrapper.html">KingfisherWrapper</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/LocalFileImageDataProvider.html">LocalFileImageDataProvider</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/OverlayImageProcessor.html">OverlayImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/PropagationError.html">PropagationError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/RawImageDataProvider.html">RawImageDataProvider</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/RectCorner.html">RectCorner</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/RenderingModeImageModifier.html">RenderingModeImageModifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ResizingImageProcessor.html">ResizingImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs.html#/s:10Kingfisher25RetrieveImageDownloadTaskV">RetrieveImageDownloadTask</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/RetrieveImageResult.html">RetrieveImageResult</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/RoundCornerImageProcessor.html">RoundCornerImageProcessor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/TintImageProcessor.html">TintImageProcessor</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher6Buttona">Button</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher5Colora">Color</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher17CompletionHandlera">CompletionHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher21DownloadProgressBlocka">DownloadProgressBlock</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher24DownloadTaskUpdatedBlocka">DownloadTaskUpdatedBlock</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher5Imagea">Image</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher32ImageDownloaderCompletionHandlera">ImageDownloaderCompletionHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher28ImageDownloaderProgressBlocka">ImageDownloaderProgressBlock</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher9ImageViewa">ImageView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/IndicatorView">IndicatorView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher13IndicatorViewa">IndicatorView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/KFCrossPlatformButton">KFCrossPlatformButton</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher21KFCrossPlatformButtona">KFCrossPlatformButton</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/KFCrossPlatformColor">KFCrossPlatformColor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher20KFCrossPlatformColora">KFCrossPlatformColor</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/KFCrossPlatformImage">KFCrossPlatformImage</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher20KFCrossPlatformImagea">KFCrossPlatformImage</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/KFCrossPlatformImageView">KFCrossPlatformImageView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher24KFCrossPlatformImageViewa">KFCrossPlatformImageView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/KFCrossPlatformView">KFCrossPlatformView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher19KFCrossPlatformViewa">KFCrossPlatformView</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher27PrefetcherCompletionHandlera">PrefetcherCompletionHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher23PrefetcherProgressBlocka">PrefetcherProgressBlock</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher33PrefetcherSourceCompletionHandlera">PrefetcherSourceCompletionHandler</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher29PrefetcherSourceProgressBlocka">PrefetcherSourceProgressBlock</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher11Transformera">Transformer</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Typealiases.html#/s:10Kingfisher4Viewa">View</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>ImagePrefetcher</h1>
              <div class="declaration">
                <div class="language">
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">ImagePrefetcher</span> <span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>

                </div>
              </div>
            <p><code>ImagePrefetcher</code> represents a downloading manager for requesting many images via URLs, then caching them.
This is useful when you know a list of image resources and want to download them before showing. It also works with
some Cocoa prefetching mechanism like table view or collection view <code>prefetchDataSource</code>, to start image downloading
and caching before they display on screen.</p>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:s23CustomStringConvertibleP11descriptionSSvp"></a>
                    <a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
                    <a class="token" href="#/s:s23CustomStringConvertibleP11descriptionSSvp">description</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/onevcat/Kingfisher/tree/5.12.0/Sources/Networking/ImagePrefetcher.swift#L74-L76">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10Kingfisher15ImagePrefetcherC22maxConcurrentDownloadsSivp"></a>
                    <a name="//apple_ref/swift/Property/maxConcurrentDownloads" class="dashAnchor"></a>
                    <a class="token" href="#/s:10Kingfisher15ImagePrefetcherC22maxConcurrentDownloadsSivp">maxConcurrentDownloads</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The maximum concurrent downloads to use when prefetching images. Default is 5.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">maxConcurrentDownloads</span><span class="p">:</span> <span class="kt">Int</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/onevcat/Kingfisher/tree/5.12.0/Sources/Networking/ImagePrefetcher.swift#L79">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10Kingfisher15ImagePrefetcherC4urls7options13progressBlock17completionHandlerACSay10Foundation3URLVG_SayAA0A15OptionsInfoItemOGSgySayAA8Resource_pG_A2QtcSgARtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(urls:options:progressBlock:completionHandler:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10Kingfisher15ImagePrefetcherC4urls7options13progressBlock17completionHandlerACSay10Foundation3URLVG_SayAA0A15OptionsInfoItemOGSgySayAA8Resource_pG_A2QtcSgARtcfc">init(urls:options:progressBlock:completionHandler:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates an image prefetcher with an array of URLs.</p>

<p>The prefetcher should be initiated with a list of prefetching targets. The URLs list is immutable.
After you get a valid <code>ImagePrefetcher</code> object, you call <code><a href="../Classes/ImagePrefetcher.html#/s:10Kingfisher15ImagePrefetcherC5startyyF">start()</a></code> on it to begin the prefetching process.
The images which are already cached will be skipped without downloading again.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    <p>By default, the <code>ImageDownloader.defaultDownloader</code> and <code>ImageCache.defaultCache</code> will be used as
the downloader and cache target respectively. You can specify another downloader or cache by using
a customized <code><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></code>. Both the progress and completion block will be invoked in
main thread. The <code>.callbackQueue</code> value in <code>optionsInfo</code> will be ignored in this method.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span>
    <span class="nv">urls</span><span class="p">:</span> <span class="p">[</span><span class="kt">URL</span><span class="p">],</span>
    <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">progressBlock</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher23PrefetcherProgressBlocka">PrefetcherProgressBlock</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">completionHandler</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher27PrefetcherCompletionHandlera">PrefetcherCompletionHandler</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>urls</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The URLs which should be prefetched.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>options</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Options could control some behaviors. See <code><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></code> for more.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>progressBlock</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Called every time an resource is downloaded, skipped or cancelled.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>completionHandler</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Called when the whole prefetching process finished.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/onevcat/Kingfisher/tree/5.12.0/Sources/Networking/ImagePrefetcher.swift#L127-L139">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10Kingfisher15ImagePrefetcherC9resources7options13progressBlock17completionHandlerACSayAA8Resource_pG_SayAA0A15OptionsInfoItemOGSgyAI_A2ItcSgANtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(resources:options:progressBlock:completionHandler:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10Kingfisher15ImagePrefetcherC9resources7options13progressBlock17completionHandlerACSayAA8Resource_pG_SayAA0A15OptionsInfoItemOGSgyAI_A2ItcSgANtcfc">init(resources:options:progressBlock:completionHandler:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates an image prefetcher with an array of resources.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    <p>By default, the <code>ImageDownloader.defaultDownloader</code> and <code>ImageCache.defaultCache</code> will be used as
the downloader and cache target respectively. You can specify another downloader or cache by using
a customized <code><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></code>. Both the progress and completion block will be invoked in
main thread. The <code>.callbackQueue</code> value in <code>optionsInfo</code> will be ignored in this method.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span>
    <span class="nv">resources</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/Resource.html">Resource</a></span><span class="p">],</span>
    <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">progressBlock</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher23PrefetcherProgressBlocka">PrefetcherProgressBlock</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">completionHandler</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher27PrefetcherCompletionHandlera">PrefetcherCompletionHandler</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>resources</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The resources which should be prefetched. See <code><a href="../Protocols/Resource.html">Resource</a></code> type for more.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>options</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Options could control some behaviors. See <code><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></code> for more.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>progressBlock</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Called every time an resource is downloaded, skipped or cancelled.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>completionHandler</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Called when the whole prefetching process finished.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/onevcat/Kingfisher/tree/5.12.0/Sources/Networking/ImagePrefetcher.swift#L154-L163">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10Kingfisher15ImagePrefetcherC7sources7options13progressBlock17completionHandlerACSayAA6SourceOG_SayAA0A15OptionsInfoItemOGSgyAJ_A2JtcSgAOtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(sources:options:progressBlock:completionHandler:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:10Kingfisher15ImagePrefetcherC7sources7options13progressBlock17completionHandlerACSayAA6SourceOG_SayAA0A15OptionsInfoItemOGSgyAJ_A2JtcSgAOtcfc">init(sources:options:progressBlock:completionHandler:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Creates an image prefetcher with an array of sources.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    <p>By default, the <code>ImageDownloader.defaultDownloader</code> and <code>ImageCache.defaultCache</code> will be used as
the downloader and cache target respectively. You can specify another downloader or cache by using
a customized <code><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></code>. Both the progress and completion block will be invoked in
main thread. The <code>.callbackQueue</code> value in <code>optionsInfo</code> will be ignored in this method.</p>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="n">convenience</span> <span class="nf">init</span><span class="p">(</span><span class="nv">sources</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Enums/Source.html">Source</a></span><span class="p">],</span>
    <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">progressBlock</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher29PrefetcherSourceProgressBlocka">PrefetcherSourceProgressBlock</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span>
    <span class="nv">completionHandler</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:10Kingfisher33PrefetcherSourceCompletionHandlera">PrefetcherSourceCompletionHandler</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>sources</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The sources which should be prefetched. See <code><a href="../Enums/Source.html">Source</a></code> type for more.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>options</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Options could control some behaviors. See <code><a href="../Typealiases.html#/s:10Kingfisher0A11OptionsInfoa">KingfisherOptionsInfo</a></code> for more.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>progressBlock</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Called every time an source fetching successes, fails, is skipped.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>completionHandler</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Called when the whole prefetching process finished.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/onevcat/Kingfisher/tree/5.12.0/Sources/Networking/ImagePrefetcher.swift#L178-L186">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10Kingfisher15ImagePrefetcherC5startyyF"></a>
                    <a name="//apple_ref/swift/Method/start()" class="dashAnchor"></a>
                    <a class="token" href="#/s:10Kingfisher15ImagePrefetcherC5startyyF">start()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Starts to download the resources and cache them. This can be useful for background downloading
of assets that are required for later use in an app. This code will not try and update any UI
with the results of the process.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">start</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/onevcat/Kingfisher/tree/5.12.0/Sources/Networking/ImagePrefetcher.swift#L207-L234">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:10Kingfisher15ImagePrefetcherC4stopyyF"></a>
                    <a name="//apple_ref/swift/Method/stop()" class="dashAnchor"></a>
                    <a class="token" href="#/s:10Kingfisher15ImagePrefetcherC4stopyyF">stop()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Stops current downloading progress, and cancel any future prefetching activity that might be occuring.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">stop</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                      <div class="slightly-smaller">
                        <a href="https://github.com/onevcat/Kingfisher/tree/5.12.0/Sources/Networking/ImagePrefetcher.swift#L237-L243">Show on GitHub</a>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2019 <a class="link" href="https://onevcat.com" target="_blank" rel="external">Wei Wang</a>. All rights reserved. (Last updated: 2019-12-13)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
